package com.hs.srm.admin.modules.inforecord.entity;

import cn.afterturn.easypoi.excel.annotation.Excel;
import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import com.hs.srm.base.common.annotation.DictMapping;
import com.hs.srm.base.common.base.CloneableEntity;
import com.hs.srm.base.common.utils.DictDataUtil;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.io.Serializable;

@Setter
@Getter
@TableName("essential_information_log")
@ToString
public class InforecordLogEntity implements Serializable, CloneableEntity<InforecordLogEntity> {

    private static final long serialVersionUID = 1L;

    public InforecordLogEntity() {
        super();
    }

    /*
     * 主键ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    @TableField("id")
    @Excel(name = "主键ID", orderNum = "1")
    private Integer id;

    /*
     * 物料号
     */
    @TableField("material_code")
    @Excel(name = "物料号", orderNum = "2")
    private String materialCode;

    /*
     * 物料组
     */
    @TableField("material_group")
    @Excel(name = "物料组", orderNum = "3")
    @DictMapping(type = DictDataUtil.DictType.WLZ)
    private String materialGroup;

    /**
     * 物料描述
     */
    @TableField(exist = false)
    private String materialDesc;

    /**
     * SRM供应商编码
     */
    @TableField("srm_code")
    @Excel(name = "供应商代码", orderNum = "4")
    private String srmCode;

    /**
     * 供应商名称
     */
    @TableField(exist = false)
    private String vendorName;

    /**
     * 工厂
     */
    @TableField("werks")
    @Excel(name = "工厂", orderNum = "5")
    @DictMapping(type = DictDataUtil.DictType.GC)
    private String werks;

    /*
     * 采购组
     */
    @TableField("purchase_group")
    @Excel(name = "采购组", orderNum = "6")
    @DictMapping(type = DictDataUtil.DictType.CGZ)
    private String purchaseGroup;

    /*
     * 采购组织
     */
    @TableField("purch_arg")
    @Excel(name = "采购组织", orderNum = "7")
    @DictMapping(type = DictDataUtil.DictType.CGZZ)
    private String purchArg;

    /*
     * 税代码
     */
    @TableField("tax_code")
    @Excel(name = "税代码", orderNum = "8")
    @DictMapping(type = DictDataUtil.DictType.SDM)
    private String taxCode;

    /*
     * 采购信息记录中的净价
     */
    @TableField("price")
    @Excel(name = "含税单价", orderNum = "9")
    private java.math.BigDecimal price;

    /*
     * 币种
     */
    @TableField("currency")
    @Excel(name = "条件货币", orderNum = "10")
    @DictMapping(type = DictDataUtil.DictType.BZ)
    private String currency;

    /*
     * 价格计量单位
     */
    @TableField("price_unit")
    @Excel(name = "价格计量单位", orderNum = "11")
    private String priceUnit;


    /*
     * 条件记录有效起始日
     */
    @TableField("start_data")
    @Excel(name = "起始日期", orderNum = "13")
    @JSONField(format = "yyyy-MM-dd")
    private java.util.Date startData;

    /*
     * 价格有效日结束时间
     */
    @TableField("price_end_data")
    @Excel(name = "截止日期", orderNum = "14")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private java.util.Date priceEndData;

    /*
     *创建时间
     */
    @TableField("createtime")
    @Excel(name = "创建时间", orderNum = "15")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private java.util.Date createtime;

    /*
     * Sap返回的编号
     */
    @TableField("info_code")
    @Excel(name = "信息记录编号", orderNum = "16")
    private String infoCode;


    /*
     * 标准数量
     */
    @TableField("standard_num")
    @Excel(name = "标准数量", orderNum = "19")
    private java.math.BigDecimal standardNum;

    /*
     * 周期
     */
    @TableField("cycle")
    @Excel(name = "计划交货时间", orderNum = "20")
    private java.math.BigDecimal cycle;
    /*
     * 订单单位
     */
    @TableField("purchase_unit")
    @Excel(name = "订单单位", orderNum = "21")
    @DictMapping(type = DictDataUtil.DictType.JLDW)
    private String purchaseUnit;

    /**
     * 信息记录状态：0，未确认；1，已确认
     */
    @TableField("info_status")
    private Integer infoStatus;

    /**
     * 采购信息记录分类
     */
    @TableField("classify")
    @Excel(name = "信息类别", orderNum = "21")
    private String classify;

    /*
     * 定价单位
     */
    @TableField(exist = false)
    @Excel(name = "定价单位", orderNum = "21")
    private String unit;


    /*
     * 修改人
     */
    @TableField("update_user")
    @Excel(name = "修改人", orderNum = "21")
    private String updateUser;


    /*
     * 标志 1.创建 0修改
     */
    @TableField("flag")
    @Excel(name = "flag", orderNum = "1")
    private Integer flag;

    /*
     * sap:从sap同步到srm,srm:srm上面创建的
     */
    @TableField("sap_or_srm")
    @Excel(name = "sapOrSrm", orderNum = "1")
    private String sapOrSrm;

    @Override
    public InforecordLogEntity clone() {
        try {
            return (InforecordLogEntity) super.clone();
        } catch (CloneNotSupportedException ex) {
            ex.printStackTrace();
        }
        return null;
    }
}

